import axios from './axios'


//获取所有任务列表
export const queryAllByCourseId=(courseId)=>{
    return axios.request({
        url:'/task/queryAllByCourseId?courseId='+courseId,
        method:'post',
    })
}

export const add=(form)=>{
    return axios.request({
        url:'/task/add',
        method:'post',
        data:form
    })
}
export const deleteTaskById=(id)=>{
    return axios.request({
        url:'/task/deleteById?id='+id,
        method:'post'
    })
}
export const edit=(form)=>{
    return axios.request({
        url:'/task/edit',
        method:'post',
        data:form
    })
}


export const queryNotExpiredByCourseId=(courseId)=>{
    return axios.request({
        url:'/task/queryNotExpiredByCourseId?courseId='+courseId,
        method:'post',
    })
}

export const queryExpiredByCourseId=(courseId)=>{
    return axios.request({
        url:'/task/queryExpiredByCourseId?courseId='+courseId,
        method:'post',
    })
}

export const queryById=(id)=>{
    return axios.request({
        url:'/task/queryById?id='+id,
        method:'post',
    })
}
